1. Field of the Invention
This invention relates to a new computing apparatus and method for journalling the creation, deletion and modification of recoverable objects including messages, data base records or tuples, and persistent systems states.
2. Description of the Prior Art
In the operation of computing systems, it is the practice to provide a data base management system which operates under an operating system to manage the creation, deletion, and modification of records stored in a data base. Such data base management systems, especially those which process multiple, concurrent transactions, are required to maintain the integrity of the data base in spite of the possibility of (1) failure of the media upon which the data base is recorded, (2) failure of the computing system in which the data base management system is operating, or (3) failure of one or more of the transactions to successfully complete its processing. These failures may be the result of complete loss of power to the computing system's main storage. Because main storage is generally volatile, and requires power to maintain the information contained therein, such a power loss will result in loss of knowledge by the system as to its own state, the state of processes under its control, and information with respect to changes being made to the data base.
In order to recover from such failures, prior art data base management systems provide a journal of changes made to the data base, of messages, and of persistent system states. Such a journal is stored in blocks in either volatile main storage buffers or non-volatile storage devices, such as magnetic tape or disks. (The term "block" refers to a collection of one or more records either in main storage buffers or in non-volatile storage devices.) Initially, the data is stored in buffers because these are directly addressable by the instruction processing unit. Subsequently, the data is moved to non-volatile storage blocks, either because the buffer is filled or because the data must be permanently stored. For performance and storage efficiency, large buffer and storage block sizes are preferred. However, only data stored in non-volatile storage blocks is persistent. Thus, when process epochs (such as synchronization or commit points) occur which assume that journal data will persist, the data in buffers must be transferred into such storage blocks. These process epochs do not normally coincide with buffer overflow epochs, so a way must be provided to store partially filled, or truncated, buffers. Traditionally, this is done by rewriting storage blocks.
In one prior art logging technique which rewrites storage blocks, journalling is accomplished by writing log records to an on-line data set (OLDS), and rewriting OLDS blocks which are partially filled. Such a system is exposed to the loss of data if a power failure occurs during the time that the OLDS block is being rewritten, resulting in termination of an in-process write with the remainder of the storage block being filled out with zeros. In addition, there is substantial latency in this technique, as a specific OLDS block must be located for rewriting.
In another prior art logging technique, a pair of tracks are preformatted on a non-volatile file, such as a fixed head file, in addition to the OLDS, with each block in the formatted track having the same record number. This data set is written when a process epoch occurs, with each write to alternate tracks. The use of the same record number for all blocks makes the track incomprehensible to existing dump-restore utilities, but does reduce latency losses when writing incomplete OLDS blocks. That is, such utilities will dump only one block, and only one block is restored. Thus, if a dump-restore action is executed against the fixed head file after system failure but before the file is written out to a journal tape or disk device, information may be lost. Further, in this technique, the fixed head file blocks are the same size as OLDS blocks, and it is necessary to establish a tradeoff between the size of OLDS blocks (which are preferably large for efficiency of the write operation from main storage buffers) and the size of the fixed head file blocks (which are preferably short to avoid extensive rewrite of the block with each process epoch.)